package com.tang.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;

public class MyChannelInitializer extends ChannelInitializer<NioDatagramChannel> {

    private final EventLoopGroup group = new NioEventLoopGroup();

    @Override
    protected void initChannel(NioDatagramChannel channel) {
        ChannelPipeline pipeline = channel.pipeline();
        pipeline.addLast(group, new MyServerHandler());
    }

}
